package com.aabte.design2.behavioral.chain.v1;

import com.aabte.design2.behavioral.chain.Request;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class BaseHandler implements Handler {

    private Handler next;

    @Override
    public void setNext(Handler handler) {
        this.next = handler;
    }

    @Override
    public void handle(Request request) {
        if (null != next) {
            next.handle(request);
        }
    }
}
